Integrand size = 19, antiderivative size = 77 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx=\frac {3 b x}{8}-\frac {a \cos (e+f x)}{f}+\frac {a \cos ^3(e+f x)}{3 f}-\frac {3 b \cos (e+f x) \sin (e+f x)}{8 f}-\frac {b \cos (e+f x) \sin ^3(e+f x)}{4 f} \]
3/8*b*x-a*cos(f*x+e)/f+1/3*a*cos(f*x+e)^3/f-3/8*b*cos(f*x+e)*sin(f*x+e)/f- 1/4*b*cos(f*x+e)*sin(f*x+e)^3/f
Time = 0.17 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.99 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx=\frac {3 b (e+f x)}{8 f}-\frac {3 a \cos (e+f x)}{4 f}+\frac {a \cos (3 (e+f x))}{12 f}-\frac {b \sin (2 (e+f x))}{4 f}+\frac {b \sin (4 (e+f x))}{32 f} \]
(3*b*(e + f*x))/(8*f) - (3*a*Cos[e + f*x])/(4*f) + (a*Cos[3*(e + f*x)])/(1 2*f) - (b*Sin[2*(e + f*x)])/(4*f) + (b*Sin[4*(e + f*x)])/(32*f)
Time = 0.36 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.03, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.474, Rules used = {3042, 3227, 3042, 3113, 2009, 3115, 3042, 3115, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (e+f x)^3 (a+b \sin (e+f x))dx\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle a \int \sin ^3(e+f x)dx+b \int \sin ^4(e+f x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \sin (e+f x)^3dx+b \int \sin (e+f x)^4dx\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle b \int \sin (e+f x)^4dx-\frac {a \int \left (1-\cos ^2(e+f x)\right )d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle b \int \sin (e+f x)^4dx-\frac {a \left (\cos (e+f x)-\frac {1}{3} \cos ^3(e+f x)\right )}{f}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle b \left (\frac {3}{4} \int \sin ^2(e+f x)dx-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )-\frac {a \left (\cos (e+f x)-\frac {1}{3} \cos ^3(e+f x)\right )}{f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle b \left (\frac {3}{4} \int \sin (e+f x)^2dx-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )-\frac {a \left (\cos (e+f x)-\frac {1}{3} \cos ^3(e+f x)\right )}{f}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle b \left (\frac {3}{4} \left (\frac {\int 1dx}{2}-\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )-\frac {a \left (\cos (e+f x)-\frac {1}{3} \cos ^3(e+f x)\right )}{f}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle b \left (\frac {3}{4} \left (\frac {x}{2}-\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )-\frac {a \left (\cos (e+f x)-\frac {1}{3} \cos ^3(e+f x)\right )}{f}\) |
-((a*(Cos[e + f*x] - Cos[e + f*x]^3/3))/f) + b*(-1/4*(Cos[e + f*x]*Sin[e + f*x]^3)/f + (3*(x/2 - (Cos[e + f*x]*Sin[e + f*x])/(2*f)))/4)
3.2.49.3.1 Defintions of rubi rules used
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Time = 1.62 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.78
method | result | size |
derivativedivides | \(\frac {b \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}}{f}\) | \(60\) |
default | \(\frac {b \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}}{f}\) | \(60\) |
parallelrisch | \(\frac {36 b x f +3 b \sin \left (4 f x +4 e \right )+8 a \cos \left (3 f x +3 e \right )-24 \sin \left (2 f x +2 e \right ) b -72 a \cos \left (f x +e \right )-64 a}{96 f}\) | \(60\) |
parts | \(-\frac {a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3 f}+\frac {b \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) | \(62\) |
risch | \(\frac {3 b x}{8}-\frac {3 a \cos \left (f x +e \right )}{4 f}+\frac {b \sin \left (4 f x +4 e \right )}{32 f}+\frac {a \cos \left (3 f x +3 e \right )}{12 f}-\frac {b \sin \left (2 f x +2 e \right )}{4 f}\) | \(63\) |
norman | \(\frac {\frac {3 b x}{8}-\frac {4 a}{3 f}-\frac {3 b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}-\frac {11 b \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {11 b \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {3 b \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}+\frac {3 b x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {9 b x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {3 b x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {3 b x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}-\frac {4 a \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {16 a \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4}}\) | \(188\) |
1/f*(b*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/3*a *(2+sin(f*x+e)^2)*cos(f*x+e))
Time = 0.27 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.78 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx=\frac {8 \, a \cos \left (f x + e\right )^{3} + 9 \, b f x - 24 \, a \cos \left (f x + e\right ) + 3 \, {\left (2 \, b \cos \left (f x + e\right )^{3} - 5 \, b \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \]
1/24*(8*a*cos(f*x + e)^3 + 9*b*f*x - 24*a*cos(f*x + e) + 3*(2*b*cos(f*x + e)^3 - 5*b*cos(f*x + e))*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 144 vs. \(2 (70) = 140\).
Time = 0.17 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.87 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx=\begin {cases} - \frac {a \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 a \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 b x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 b x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 b x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {5 b \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 b \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\left (e \right )}\right ) \sin ^{3}{\left (e \right )} & \text {otherwise} \end {cases} \]
Piecewise((-a*sin(e + f*x)**2*cos(e + f*x)/f - 2*a*cos(e + f*x)**3/(3*f) + 3*b*x*sin(e + f*x)**4/8 + 3*b*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*b*x *cos(e + f*x)**4/8 - 5*b*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 3*b*sin(e + f*x)*cos(e + f*x)**3/(8*f), Ne(f, 0)), (x*(a + b*sin(e))*sin(e)**3, True))
Time = 0.22 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.74 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx=\frac {32 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a + 3 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b}{96 \, f} \]
1/96*(32*(cos(f*x + e)^3 - 3*cos(f*x + e))*a + 3*(12*f*x + 12*e + sin(4*f* x + 4*e) - 8*sin(2*f*x + 2*e))*b)/f
Time = 0.30 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.81 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx=\frac {3}{8} \, b x + \frac {a \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} - \frac {3 \, a \cos \left (f x + e\right )}{4 \, f} + \frac {b \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac {b \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]
3/8*b*x + 1/12*a*cos(3*f*x + 3*e)/f - 3/4*a*cos(f*x + e)/f + 1/32*b*sin(4* f*x + 4*e)/f - 1/4*b*sin(2*f*x + 2*e)/f
Time = 9.83 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.44 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx=\frac {3\,b\,x}{8}-\frac {-\frac {3\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}-\frac {11\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{4}+4\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+\frac {11\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{4}+\frac {16\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{3}+\frac {3\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}+\frac {4\,a}{3}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^4} \]